package manager;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.util.List;

import InterfazRemota.InterfazRemota;
import NegocioVO.ComandaVO;

public class AdministradorCaja {

	private InterfazRemota ir;
	private static AdministradorCaja instancia;
	
	public static AdministradorCaja getInstancia()
	{
		if(instancia==null)
			instancia = new AdministradorCaja();
		return instancia;
	}
	
	private AdministradorCaja()
	{
		try {
			ir = (InterfazRemota) Naming.lookup("TPO_Restaurante");
			
			
		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (RemoteException e) {
			e.printStackTrace();
		} catch (NotBoundException e) {
			e.printStackTrace();
		}
	}
	
	/*public  int getTotalCaja (String LocalId) {
		
		int j = 0;
		j = Integer.valueOf(LocalId);
		try {
			return ir.listarComandasAbiertas(j);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return null;
	}*/
}
